package constants

const (
	SendMsgToUser   int32 = 1
	Logout          int32 = 2
	CreateRoom      int32 = 3
	JoinRoom        int32 = 4
	QuitRoom        int32 = 5
	SendMsgToRoom   int32 = 6
	ListRoomMembers int32 = 7
	Login           int32 = 8
)

var Commands = map[string]int32{
	"sendToUser":    SendMsgToUser,
	"logout":        Logout,
	"createRoom":    CreateRoom,
	"JoinRoom":      JoinRoom,
	"quitRoom":      QuitRoom,
	"sendMsgToRoom": SendMsgToRoom,
	"listAll":       ListRoomMembers,
	"login":         Login,
}

const (
	Magic   int32 = 0x19921110
	Version int32 = 1
)

// MsgType
const (
	Text  int32 = 1
	Image int32 = 2
	Audio int32 = 3
	Video int32 = 4
)

// MsgStatus http://www.52im.net/thread-294-1-1.html
const (
	Request int32 = 1
	Ack     int32 = 2
	Notify  int32 = 3
)
